﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Gedea.WinForm.Helpers;

namespace Gedea.WinForm.Forms.FileText
{
    public partial class Upload : Form
    {
        #region Ctr
        public static Upload Instance
        {
            get { return ViewLocator<Upload>.Instance; }
        }

        private Upload()
        {
            InitializeComponent();
        }
        #endregion

        private void Upload_FormClosed(object sender, FormClosedEventArgs e)
        {
            ViewLocator<Upload>.CloseInstance = null;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            OpenFileDialog fDialog = new OpenFileDialog();
            fDialog.Title = "Upload File Text";
            fDialog.AddExtension = true;
            fDialog.CheckFileExists = true;
            fDialog.CheckPathExists = true;
            fDialog.Filter = "Data Sources (*.txt)|*.txt*"; 
            if (fDialog.ShowDialog() == DialogResult.OK)
            {
                textBox1.Text = fDialog.FileName;
            }
        }
    }
}
